package com.youlai.boot.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.youlai.boot.common.annotation.DataPermission;
import com.youlai.boot.system.model.entity.SpotCategory;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.youlai.boot.system.model.query.SpotCategoryQuery;
import com.youlai.boot.system.model.vo.SpotCategoryVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 预售票分类Mapper接口
 *
 * @author lwb
 * @since 2025-06-29 16:31
 */
@Mapper
public interface SpotCategoryMapper extends BaseMapper<SpotCategory> {

    /**
     * 获取预售票分类分页数据
     *
     * @param page 分页对象
     * @param queryParams 查询参数
     * @return
     */
    //@DataPermission(userAlias = "sc")
    Page<SpotCategoryVO> getSpotCategoryPage(Page<SpotCategoryVO> page, SpotCategoryQuery queryParams);

    /**
     *
     * @return
     */
    //@DataPermission
    List<SpotCategory> listSpotCategorysOptions();

    /**
     *
     * @param categoryId
     * @return
     */
    SpotCategory getCategoryById(@Param("categoryId") Long categoryId);
}
